#
# Makefile for the Offline NT Password Editor
#
#
# Change here to point to the needed OpenSSL libraries & .h files
# See INSTALL for more info.
#

#SSLPATH=/usr/local/ssl
OSSLPATH=/usr
OSSLINC=$(OSSLPATH)/include

CC=gcc

# Force 32 bit
CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall -m32
OSSLLIB=$(OSSLPATH)/lib

# 64 bit if default for compiler setup
#CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall
#OSSLLIB=$(OSSLPATH)/lib64


# This is to link with whatever we have, SSL crypto lib we put in static
#LIBS=-L$(OSSLLIB) $(OSSLLIB)/libcrypto.a
SRC=nt_hive.c
OBJ=libnthive.so
TGT=$(SRC:.c=.o)

all: $(OBJ)

$(OBJ) : $(TGT)
	$(CC) $(CFLAGS) -o $(OBJ) $(SRC) -shared -fPIC

$(TGT) : $(SRC)
	$(CC) $(CFLAGS) -c $(SRC)

#.c.o:
#	$(CC) -c $(CFLAGS) $<

clean:
	rm -f *.o $(OBJ) *~

